-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add documentation about OpenXR spatial entities #11015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add documentation about OpenXR spatial entities #11015
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a few grammatical issues and typos so I wanted to make a review addressing some of them. I saw that it was also a commonality in this PR to omit commas after dependent clauses, so I left in 2 cases where I noticed it occurred, but I can go back and mark more where I noticed them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do a pass to improve sentence structure as well later
Thanks for the feedback everyone, just to let you all know, I'm planning on updating this PR after we're certain about the API on the implementation PR just to minimize having to go back and forth on those changes. Will be updating this PR soonish |
27ac884
to
a5b0b4a
Compare
a5b0b4a
to
4edb00e
Compare
|
||
|
||
** | ||
Q : Should we be doing update queries here to get position changes for markers?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly a reminder to myself, I need to add this in. We now do this in the built-in logic as well.
I think I covered all the comments, only some outstanding stuff around parameter naming which remains a problem. Also need to find some time to add update queries to the marker example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions for breaking up the sentences, can look at more cases later
how they are found, and how information about them is stored and accessed. | ||
|
||
Various extensions are added on top that implement specific systems such as marker tracking, | ||
plane tracking and anchors. These are referred to as spatial capabilities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plane tracking and anchors. These are referred to as spatial capabilities. | |
plane tracking, and anchors. These are referred to as spatial capabilities. |
Various extensions are added on top that implement specific systems such as marker tracking, | ||
plane tracking and anchors. These are referred to as spatial capabilities. | ||
|
||
Each entity that can be handled by the system is broken up into smaller components which makes it easy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each entity that can be handled by the system is broken up into smaller components which makes it easy | |
Each entity that can be handled by the system is broken up into smaller components, which makes it easy |
All entity trackers will expose their location through the ``default`` pose. | ||
|
||
We can automate creating these subscenes and adding them to our scene tree by creating a manager | ||
object. As all locations are local to the :ref:`XROrigin3D<class_XROrigin3D>` node we should create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
object. As all locations are local to the :ref:`XROrigin3D<class_XROrigin3D>` node we should create | |
object. As all locations are local to the :ref:`XROrigin3D<class_XROrigin3D>` node, we should create |
each type of entity. | ||
|
||
Generally speaking we will instance different subscenes for each type of entity. | ||
As the tracker objects can be used with :ref:`XRAnchor3D<class_XRAnchor3D>` nodes these subscenes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the tracker objects can be used with :ref:`XRAnchor3D<class_XRAnchor3D>` nodes these subscenes | |
As the tracker objects can be used with :ref:`XRAnchor3D<class_XRAnchor3D>` nodes, these subscenes |
Alternatively we can assign a material that will visualize the plane for debugging. | ||
|
||
We configure this material as the ``material_override`` material on our MeshInstance3D. | ||
For our "hole punch" material create a :ref:`ShaderMaterial<class_ShaderMaterial>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For our "hole punch" material create a :ref:`ShaderMaterial<class_ShaderMaterial>` | |
For our "hole punch" material, create a :ref:`ShaderMaterial<class_ShaderMaterial>` |
OpenXR spatial entities | ||
======================= | ||
|
||
For any sort of augmented reality application you need to access real world information and be able to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For any sort of augmented reality application you need to access real world information and be able to | |
For any sort of augmented reality application you need to access real world information, and be able to |
Note that various XR devices also require permission flags to be set. These will need to be | ||
enabled in the export preset settings. | ||
|
||
Enabling the different capabilities activates the related OpenXR APIs but additional logic is needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling the different capabilities activates the related OpenXR APIs but additional logic is needed | |
Enabling the different capabilities activates the related OpenXR APIs, but additional logic is needed |
For each core system we have built-in logic that can be enabled that will do this for you. | ||
|
||
We'll discuss the spatial entities system under the assumption the built-in logic is enabled first. | ||
We will then take a look at the underlying APIs and how you can implement this yourself however it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will then take a look at the underlying APIs and how you can implement this yourself however it | |
We will then take a look at the underlying APIs and how you can implement this yourself, however it |
When a spatial anchor has been made persistent, a Universally Unique Identifier (or UUID) is | ||
assigned to the anchor. You will need to store this with whatever information you need to | ||
reconstruct the scene. | ||
In our example code below we'll simply call ``set_scene_path`` and ``get_scene_path`` but you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our example code below we'll simply call ``set_scene_path`` and ``get_scene_path`` but you | |
In our example code below we'll simply call ``set_scene_path`` and ``get_scene_path``, but you |
"unpersistent" and then clean up the anchor. | ||
Also you will get an error if you try to destroy an anchor that is still persistent. | ||
|
||
To complete our anchor system we start with creating a scene that we'll set as the scene |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To complete our anchor system we start with creating a scene that we'll set as the scene | |
To complete our anchor system we start by creating a scene that we'll set as the scene |
This PR adds documentation for the spatial entities implementation being added here: godotengine/godot#107391